<?xml version="1.0" encoding="windows-1251"?>
<!DOCTYPE hrc PUBLIC "-//Cail Lomecb//DTD Colorer HRC take5//EN"
  "http://colorer.sf.net/2003/hrc.dtd">
<hrc version="take5" xmlns="http://colorer.sf.net/2003/hrc"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd">
<!--
  Syntax highlighting for Atmel AVR MCU's
  By Igor Yudincev <igor_yudincev@mail.ru>

  based on Z80 Assembler syntax 2.0
  By Alex Smith <thims@inbox.ru>
                <flame@baltnet.ru>
                <Alex.Kuznetsov@p9.f33.n478.z2.fidonet.org (2:478/33.9)>
-->
   <type name="avr">

      <import type="def"/>

      <region name="aCommand" parent="Label"/>
      <region name="aDirective" parent="Directive"/>
      <region name="aLabel" parent="Label"/>
      <region name="aMnemoCommon" parent="Operator"/>
      <region name="aMnemoJumps" parent="Operator"/>
      <region name="aToken" parent="Label"/>
      <region name="aRegister" parent="Register"/>
      <region name="aLComment" parent="Comment"/>
      <region name="aBComment" parent="Comment"/>
      <region name="aSymbol" parent="Symbol"/>
      <region name="aString" parent="String"/>
      <region name="aNumDec" parent="NumberDec"/>
      <region name="aNumHex" parent="NumberHex"/>
      <region name="aNumBin" parent="NumberBin"/>
      <region name="aNumOct" parent="NumberOct"/>
      <region name="aChapter" parent="Label"/>
      <region name="aTopicNum" parent="NumberHex"/>
      <region name="aTopicName" parent="String"/>
      <region name="aToDo" parent="TODO"/>


      <scheme name="BaseAVR">
<!-- AVR mnemonics -->
         <keywords ignorecase="yes" region="aMnemoCommon">
           <word name="add"/>
           <word name="adc"/>
           <word name="sub"/>
           <word name="subi"/>
           <word name="sbc"/>
           <word name="sbci"/>
           <word name="and"/>
           <word name="andi"/>
           <word name="or"/>
           <word name="ori"/>
           <word name="eor"/>
           <word name="com"/>
           <word name="neg"/>
           <word name="sbr"/>
           <word name="cbr"/>
           <word name="inc"/>
           <word name="dec"/>
           <word name="tst"/>
           <word name="clr"/>
           <word name="ser"/>
           <word name="adiw"/>
           <word name="sbiw"/>
           <word name="mul"/>
           <word name="muls"/>
           <word name="mulsu"/>
           <word name="fmul"/>
           <word name="fmuls"/>
           <word name="fmulsu"/>
           <word name="ijmp"/>
           <word name="eijmp"/>
           <word name="icall"/>
           <word name="eicall"/>
           <word name="ret"/>
           <word name="reti"/>
           <word name="cpse"/>
           <word name="cp"/>
           <word name="cpc"/>
           <word name="cpi"/>
           <word name="sbrc"/>
           <word name="sbrs"/>
           <word name="sbic"/>
           <word name="sbis"/>
           <word name="mov"/>
           <word name="movw"/>
           <word name="ldi"/>
           <word name="lds"/>
           <word name="ld"/>
           <word name="ldd"/>
           <word name="sts"/>
           <word name="st"/>
           <word name="std"/>
           <word name="lpm"/>
           <word name="elpm"/>
           <word name="spm"/>
           <word name="espm"/>
           <word name="in"/>
           <word name="out"/>
           <word name="push"/>
           <word name="pop"/>
           <word name="lsl"/>
           <word name="lsr"/>
           <word name="rol"/>
           <word name="ror"/>
           <word name="asr"/>
           <word name="swap"/>
           <word name="bset"/>
           <word name="bclr"/>
           <word name="sbi"/>
           <word name="cbi"/>
           <word name="bst"/>
           <word name="bld"/>
           <word name="sec"/>
           <word name="clc"/>
           <word name="sen"/>
           <word name="cln"/>
           <word name="sez"/>
           <word name="clz"/>
           <word name="sei"/>
           <word name="cli"/>
           <word name="ses"/>
           <word name="cls"/>
           <word name="sev"/>
           <word name="clv"/>
           <word name="set"/>
           <word name="clt"/>
           <word name="seh"/>
           <word name="clh"/>
           <word name="nop"/>
           <word name="sleep"/>
           <word name="wdr"/>
         </keywords>
         <regexp match="/^\s*((\w|\?)+\:)?\s*(r?jmp|r?call|br[BbCcHhTtVv][CcSs]|br(ne|eq|sh|lo|mi|pl|ge|lt|ie|id))\s+((\w|\?)+)/i"
                 region1="aLabel" region3="aMnemoJumps" region5="aLabel" />
         <keywords ignorecase="yes" region="aMnemoJumps">
           <word name="rjmp"/>
           <word name="jmp"/>
           <word name="rcall"/>
           <word name="call"/>
           <word name="brbc"/>
           <word name="brbs"/>
           <word name="breq"/>
           <word name="brne"/>
           <word name="brcs"/>
           <word name="brcc"/>
           <word name="brsh"/>
           <word name="brlo"/>
           <word name="brmi"/>
           <word name="brpl"/>
           <word name="brge"/>
           <word name="brlt"/>
           <word name="brhs"/>
           <word name="brhc"/>
           <word name="brts"/>
           <word name="brtc"/>
           <word name="brvs"/>
           <word name="brvc"/>
           <word name="brie"/>
           <word name="brid"/>
         </keywords>
         <!-- AVR registers -->
         <regexp match="/\bR(\d|[12]\d|3[01])\b/i" region0="aRegister"/>
         <regexp match="/\b[XxYyZz][HhLl]?\b/i" region0="aRegister"/>
      </scheme>

      <!-- AVRASM syntax -->

      <scheme name="avr">
         <inherit scheme="BaseAVR"/>
<!-- Macro args -->
         <regexp match="/@\d/" region0="aDirective"/>
<!-- Symbols -->
         <keywords region="aSymbol">
           <symb name="="/><symb name="+"/><symb name="-"/>
           <symb name="/"/><symb name="*"/><symb name="("/>
           <symb name=")"/><symb name="&lt;"/><symb name=">"/>
           <symb name=","/><symb name="&amp;"/><symb name="%"/>
           <symb name="~"/><symb name="!"/>
         </keywords>
<!-- Numbers - Oct -->
         <regexp match="/\b0[0-7]+\b/" region0="aNumOct"/>
<!-- Numbers - Dec -->
         <regexp match="/\b\d+\b/" region0="aNumDec"/>
<!-- Numbers - Hex -->
         <regexp match="/\W\$[0-9a-fA-F]+\b/" region0="aNumHex"/>
         <regexp match="/\b0x[0-9a-fA-F]+\b/i" region0="aNumHex"/>
         <regexp match="/\d[0-9a-fA-F]+H\b/i" region0="aNumHex"/>
<!-- Numbers - Bin -->
         <regexp match="/0b[01]+\b/i" region0="aNumBin"/>
<!-- Comments -->
         <regexp match="/;\!\!.*$/" region0="aToDo"/>
         <regexp match="/;\?\?.*$/" region0="aToDo"/>
         <regexp match="/\;.*$/" region0="aLComment"/>
<!-- Strings -->
         <regexp match="/&#34;.*?&#34;/" region0="aString"/>
<!-- Strings -->
         <regexp match="/('.*?')/" region0="aString"/>
<!-- Operators -->
         <keywords ignorecase="yes" region="aDirective">
            <word name="HIGH"/>
            <word name="LOW"/>
            <word name="BYTE2"/>
            <word name="BYTE3"/>
            <word name="BYTE4"/>
            <word name="LWRD"/>
            <word name="HWRD"/>
            <word name="PAGE"/>
            <word name="EXP2"/>
            <word name="LOG2"/>
         </keywords>
<!-- Directives -->
         <keywords ignorecase="yes" region="aDirective">
            <word name=".BYTE"/>
            <word name=".cseg"/>
            <word name=".csegsize"/>
            <word name=".db"/>
            <word name=".def"/>
            <word name=".device"/>
            <word name=".dseg"/>
            <word name=".dw"/>
            <word name=".endm"/>
            <word name=".endmacro"/>
            <word name=".EQU"/>
            <word name=".eseg"/>
            <word name=".exit"/>
            <word name=".include"/>
            <word name=".list"/>
            <word name=".listmac"/>
            <word name=".macro"/>
            <word name=".nolist"/>
            <word name=".org"/>
            <word name=".set"/>
            <word name=".else"/>
            <word name=".elif"/>
            <word name=".endif"/>
            <word name=".if"/>
            <word name=".ifdef"/>
            <word name=".ifndef"/>
            <word name=".message"/>
         </keywords>
<!-- Labels, Functions and Macros -->
         <regexp match="/^\s*?(\S+)\s+?(.BYTE)\s/i" region1="aLabel" region2="aDirective"/>
         <regexp match="/^\s*([A-Za-z\@\_\!\?\^\~\\\|\`][\w\@\!\?\^\~\\\|\`\#\$\%]*)(\:)/i"
                 region0="aLabel"/>
      </scheme>

   </type>
</hrc>
<!-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
   -
   - The contents of this file are subject to the Mozilla Public License Version
   - 1.1 (the "License"); you may not use this file except in compliance with
   - the License. You may obtain a copy of the License at
   - http://www.mozilla.org/MPL/
   -
   - Software distributed under the License is distributed on an "AS IS" basis,
   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   - for the specific language governing rights and limitations under the
   - License.
   -
   - The Original Code is the Colorer Library.
   -
   - The Initial Developer of the Original Code is
   - Igor Yudincev <igor_yudincev@mail.ru>.
   - Portions created by the Initial Developer are Copyright (C) 1999-2005
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -
   - Alternatively, the contents of this file may be used under the terms of
   - either the GNU General Public License Version 2 or later (the "GPL"), or
   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   - in which case the provisions of the GPL or the LGPL are applicable instead
   - of those above. If you wish to allow use of your version of this file only
   - under the terms of either the GPL or the LGPL, and not to allow others to
   - use your version of this file under the terms of the MPL, indicate your
   - decision by deleting the provisions above and replace them with the notice
   - and other provisions required by the LGPL or the GPL. If you do not delete
   - the provisions above, a recipient may use your version of this file under
   - the terms of any one of the MPL, the GPL or the LGPL.
   -
   - ***** END LICENSE BLOCK ***** -->
